package com.tlgen.orm.common;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.tlgen.orm.annotation.AsLogicalField;
import com.tlgen.orm.annotation.AsNotField;
import com.tlgen.orm.annotation.Id;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class BaseEntity {

    @Id
    private String id;
    private String createBy;
    private String createByUserId;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    private String updateBy;
    private String updateByUserId;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    @AsLogicalField
    private Integer delFlag;
    @AsNotField
    @JsonIgnore
    private Integer pageNum;
    @AsNotField
    @JsonIgnore
    private Integer pageSize;

}
